const mysql = require("mysql");
const http = require("http");
const fs = require("fs");
const path = require("path");

var con = mysql.createConnection({
    host: "192.168.244.144",
    port: 3306,
    user: "root",
    password: "ddd",
    database: "mydatabase"
})
con.connect();

http.createServer((req, res) => {
    var fileContent = fs.readFileSync("./chapter.html");
    res.writeHead(200, {"Content-Type": "text/html;charset:utf8"});
    res.write(fileContent);
    res.end();
}).listen(8081)

